﻿@model ZJK.Models.ExtractManage.vmNewExtractForSelectedProjects
@{
    ViewBag.Title = "专家抽取-项目评标专家抽取记录";
}
<link rel="stylesheet" href="@Url.Content("~/Scripts/zTree/zTreeStyle.css")" type="text/css">
<script type="text/javascript" src="@Url.Content("~/Scripts/zTree/jquery.ztree.core-3.0.min.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/zTree/jquery.ztree.excheck-3.0.min.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/extract.js")"></script>
<script type="text/javascript">
    $(document).ready(function () {
        // 初始化折叠控件
        $("#accordion").accordion({ header: "h3", autoHeight: false, collapsible: true });

        //初始化专家分类树形
        getCategorys('@Url.Content("~/Extract/getCategorysJson")');
    });

    //定义地址
    var strUrlgetExpertsBXn = '@Url.Content("~/Extract/GetExpertIDsn")';
    var strUrlgetExpertsBX = '@Url.Content("~/Extract/GetExperts")';
</script>
<h2>@ViewBag.Title</h2>
@using (Html.BeginForm("SaveNewExtract", "Extract", FormMethod.Post, new { id = "formOP" }))
{
    @Html.HiddenFor(model => model.extractRecord_Title, new { @id = "extractRecord_Title" })
    @Html.HiddenFor(model => model.selectedProjetcIDs, new { @id = "selectedProjectIDs" })
    @Html.HiddenFor(model => model.extractRecord_details_IsOK, new { @id = "extractRecord_details_IsOK" })
    @Html.HiddenFor(model => model.extractRecord_details_Describe, new { @id = "extractRecord_details_Describe" })
    @Html.HiddenFor(model => model.extractRecord_details_Type, new { @id = "extractRecord_details_Type" })
    @Html.HiddenFor(model => model.extractRecord_details_ExpertId, new { @id = "extractRecord_details_ExpertId" })
}
<div id="accordion">
    <!-- 关联项目列表 -->
    <div>
        <h3>
            <a href="#">1、关联项目列表</a></h3>
        <div>
            <div style="position: relative; width: 100%; margin: 0.7em 0;">
                <div class="ui-widget-header ui-corner-all" style="width: 25%; float: left; padding: 0.7em;">
                    <b>抽取记录标题：</b>
                </div>
                <div class="ui-corner-all" style="width: 25%; float: right; padding: 0.7em;">
                    <span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
                    设置抽取记录标题，以方便获取抽取记录信息。
                </div>
                <div class="ui-widget-content ui-corner-all" style="margin-left: 28%; margin-right: 28%; top: 0px; padding: 0.7em 0.4em;">
                    @Html.TextBoxFor(m => m.extractRecord_Title, new { @id = "Title", @style = "width:90%;" })
                </div>
                <div class="clear">
                </div>
            </div>
            <div style="position: relative; width: 100%; margin: 0.7em 0;">
                <div class="ui-widget-header ui-corner-all" style="width: 25%; float: left; padding: 0.7em;">
                    <b>抽取关联项目列表：</b>
                </div>
                <div class="ui-corner-all" style="width: 25%; float: right; padding: 0.7em;">
                    <span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
                    如果选择的项目已存在专家抽取信息，原抽取信息将被覆盖。
                </div>
                <div class="ui-widget-content ui-corner-all" style="margin-left: 28%; margin-right: 28%; top: 0px; padding: 0.7em 0.4em;">
                    <div id="project_list">
                        @foreach (var _p in @Model.extractRecord_selectedProjects)
                        {
                            <p>
                                <span>[</span><span>@_p.projectCode</span><span>]</span><span>@_p.projectName</span>
                            </p> 
                        }
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
        </div>
    </div>
    <!-- 抽取选项 -->
    <div>
        <h3>
            <a href="#">2、抽取选项</a></h3>
        <div>
            <!-- 抽取类型 -->
            <div style="position: relative; width: 100%; margin: 0.7em 0;">
                <div class="ui-widget-header ui-corner-all" style="width: 25%; float: left; padding: 0.7em;">
                    <b>2.1、专家抽取类型：</b>
                </div>
                <div class="ui-corner-all" style="width: 25%; float: right; padding: 0.7em;">
                    <span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
                    选择：当前专家抽取操作的类型；
                </div>
                <div class="ui-widget-content ui-corner-all" style="margin-left: 28%; margin-right: 28%; top: 0px; padding: 0.7em;">
                    <input type="radio" name="extracOption" id="extracOption_ZYZJ" value="ZY" checked="checked" />
                    <label for="extracOption_ZYZJ">
                        专业评委</label>；
                    <input type="radio" name="extracOption" id="extracOption_SWZJ" value="SW" />
                    <label for="extracOption_SWZJ">
                        商务评委</label>；
                </div>
                <div class="clear">
                </div>
            </div>
            <div class="clear">
            </div>
            <!-- 抽取专家的搜索分类 -->
            <div style="position: relative; width: 100%; margin: 0.7em 0;">
                <div class="ui-widget-header ui-corner-all" style="width: 25%; float: left; padding: 0.7em;">
                    <b>2.2、专家分类：</b>
                </div>
                <div class="ui-corner-all" style="width: 25%; float: right; padding: 0.7em;">
                    <span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
                    请勾选所要检索的专家的所属分类。
                </div>
                <div class="ui-widget-content ui-corner-all" style="margin-left: 28%; margin-right: 28%; top: 0px; padding: 0.7em;">
                    <div class="ui-corner-all" style="margin-right: 0; padding: 0.3em; height: 120px; width: 90%; overflow: scroll; background-color: #fff;">
                        <ul id="treeCategory" class="ztree">
                        </ul>
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
            <div class="clear">
            </div>
            <!-- 抽取专家的搜索专业 -->
            <div style="position: relative; width: 100%; margin: 0.7em 0;">
                <div class="ui-widget-header ui-corner-all" style="width: 25%; float: left; padding: 0.7em;">
                    <b>2.3、专家专业：</b>
                </div>
                <div class="ui-corner-all" style="width: 25%; float: right; padding: 0.7em;">
                    <span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
                    请设置所要检索的专家专业
                </div>
                <div class="ui-widget-content ui-corner-all" style="margin-left: 28%; margin-right: 28%; top: 0px; padding: 0.7em;">
                    <input type="text" style="width: 90%;" id="txtProfessional" />
                </div>
                <div class="clear">
                </div>
            </div>
            <div class="clear">
            </div>
            <!-- 通知方式 -->
            <div style="position: relative; width: 100%; margin: 0.7em 0;">
                <div class="ui-widget-header ui-corner-all" style="width: 25%; float: left; padding: 0.7em;">
                    <b>2.4、通知方式：</b>
                </div>
                <div class="ui-corner-all" style="width: 25%; float: right; padding: 0.7em;">
                    <span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
                    选择：<br />
                    <b>自动方式</b>，由系统自动拨号通知随机抽取的评标专家；
                    <br />
                    <b>手动方式</b>，由工作人员手工拨打随机抽取的评标专家联系电话，确定专家是否参加评标；
                    <br />
                    <div id="msg">
                    </div>
                </div>
                <div class="ui-widget-content ui-corner-all" style="margin-left: 28%; margin-right: 28%; top: 0px; padding: 0.7em;">
                    <input type="radio" name="noticeOption" id="extracOption_A" value="A" />
                    <label for="extracOption_A" style="color: Lime;">
                        自动</label>；
                    <input type="radio" name="noticeOption" id="extracOption_M" value="M" checked="checked" />
                    <label for="extracOption_M" style="color: Red;">
                        手动</label>；
                </div>
                <div class="clear">
                </div>
            </div>
            <div class="clear">
            </div>
        </div>
    </div>
    <!-- 根据抽取选项检索备选专家列表 -->
    <div>
        <h3>
            <a href="#">3、备选专家列表</a></h3>
        <div>
            <div style="position: relative; width: 100%; margin: 0.7em 0;">
                <div class="ui-widget-header ui-corner-all" style="width: 25%; float: left; padding: 0.7em;">
                    备选专家操作：
                </div>
                <div class="ui-corner-all" style="margin-left: 28%; padding: 0.7em;">
                    <a href="javascript:getExperts();"><span class="ui-icon ui-icon-search" style="float: left; margin-right: .3em;"></span>3.1、点击查询获取备选专家列表；</a>
                </div>
                <div class="clear">
                </div>
            </div>
            <div class="clear">
            </div>
            <div style="position: relative; width: 100%; margin: 0.7em 0;">
                <div class="ui-widget-header ui-corner-all" style="width: 25%; float: left; padding: 0.7em;">
                    <b>备选专家列表：</b>
                </div>
                <div class="ui-widget-content ui-corner-all" style="margin-left: 28%; top: 0px; padding: 0.7em;">
                    <div style="height: 180px; overflow: scroll;" id="expertBX">
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
            <div class="clear">
            </div>
        </div>
    </div>
    <!-- 专家抽取操作 -->
    <div>
        <h3>
            <a href="#">4、专家抽取操作</a></h3>
        <!-- 操作栏 -->
        <div>
            <div style="position: relative; width: 100%; margin: 0.7em 0;">
                <div class="ui-widget-header ui-corner-all" style="width: 25%; float: left; padding: 0.7em;">
                    <b>抽取操作：</b>
                </div>
                <div class="ui-corner-all" style="width: 25%; float: right; padding: 0.7em;">
                    <span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
                    设置抽取选项、获取备选专家后，点击按钮进行抽取操作；
                </div>
                <div class="ui-widget-content ui-corner-all" style="margin-left: 28%; margin-right: 28%; top: 0px; padding: 0.7em;">
                    <a href="javascript:extract();" class="btn" id="doExtract"><span class="ui-icon ui-icon-play"
                        style="float: left; margin-right: .3em;" id="doExtractIcon"></span><span id="doExtractCaption">4.1、开始</span></a>
                </div>
                <div class="clear">
                </div>
            </div>
            <div class="clear">
            </div>
            <!-- 抽取结果栏 -->
            <div class="ui-widget-header ui-corner-all" style="width: 25%; float: left; padding: 0.7em;">
                <b>抽取结果及操作：</b>
            </div>
            <div class="ui-corner-all" style="width: 25%; float: right; padding: 0.7em;">
                <!-- 操作栏 -->
                <div style="padding: 5px;">
                    专家：<span style="font-size: 1.5em; color: Red;" id="SelectedExpertName"></span>
                    <input type="hidden" id="SelectedExpertId" />
                </div>
                <div style="padding: 5px;">
                    <span style="color: #aaa;" id="SelectedExpertInfo"></span>
                </div>
                <div style="padding: 5px;">
                    结果：<input type="checkbox" name="SelectedExpertIsOK" id="SelectedExpertIsOK" value=""
                        checked="checked" />
                    <label for="SelectedExpertIsOK">
                        参与评标</label><br />
                    描述：<br />
                    <textarea cols="4" rows="4" style="width: 100%; height: 100px;" id="SelectedExpertDescribe"></textarea>
                </div>
                <div style="padding: 5px; text-align: center;">
                    <a href="javascript:saveThisExtractDetail();" class="btn"><span class="ui-icon ui-icon-search"
                        style="float: left; margin-right: .3em;"></span>4.2、保存当前抽取结果</a>
                </div>
            </div>
            <div class="ui-widget-content ui-corner-all" style="margin-left: 28%; margin-right: 28%; top: 0px; padding: 0.7em;">
                <!-- 结果栏 -->
                <label id="expertBXLB" style="font-size: 6em;">
                    随机选取
                </label>
            </div>
            <div class="clear">
            </div>
        </div>
    </div>
    <!-- 专家抽取结果 -->
    <div>
        <h3>
            <a href="#">5、结果列表</a></h3>
        <div>
            <div style="position: relative; width: 100%; margin: 0.7em 0;">
                <div style="width: 25%; float: left; padding: 0.7em;">
                </div>
                <div style="margin-left: 28%; top: 0px; padding: 0.7em;">
                    <input type="button" value="5.1、保存当前抽取记录" id="doSave" class="btn" onclick="confirmsaveThisExtract()" />
                </div>
                <div class="clear">
                </div>
            </div>
            <ul id="extractDetails">
            </ul>
        </div>
    </div>
</div>
